System and method for mapping InfiniBand communications to an external port, with combined buffering of virtual lanes and queue pairs

ABSTRACT

A system and method for mapping outbound communications (e.g., encapsulated Ethernet packets) from InfiniBand queue pairs (QP) and/or virtual lanes (VL) to ports through which they are to be transmitted to an external communication system. A memory is shared between the InfiniBand receive side and transmit side. A shared control structure facilitates management of a linked list for each queue pair. A linked list is composed of entries in the control structure; each entry stores a value identifying the next control entry in the list and a memory bucket associated with the entry. Each queue pair terminating has a head pointer identifying the first control entry and memory bucket, and a tail pointer identifying the last control entry and memory bucket of a linked list. When a communication is reassembled, pointers defining a sub-list comprising the communication are passed to a network transmit module.

BACKGROUND

This invention relates to the field of computer systems. Moreparticularly, a system and methods are provided for mapping ortransferring traffic received via an InfiniBand queue pair to anexternal communication system or component (e.g., an Ethernet network).

InfiniBand™ technology provides a flexible, scalable architecture forinterconnecting servers, communication networks, storage components andother systems and devices. Computing and storage nodes have becomedistributed throughout many organizations' computing environments, andthe InfiniBand architecture provides means for interconnecting thoseelements and others. For example, InfiniBand channel adapters can beused as bridges between an InfiniBand fabric and external communicationsystems or networks.

In the InfiniBand architecture, a queue pair (QP) defines an end-to-endconnection between two nodes (e.g., servers, input/output components) atthe transport protocol layer. A virtual lane (VL) operates at the linklayer, and defines single-hop connections (e.g., between two switches,between a switch and a node). Each virtual lane has an associatedservice level indicating a quality of service to be afforded the trafficwithin that virtual lane. When an InfiniBand packet is communicated, itis communicated as part of a specific queue pair, which is assignedmembership in a virtual lane for each hop. The virtual lanes used fordifferent hops may vary, but the different virtual lanes may beassociated with the same service level.

Queue pairs are flow-controlled by the receiving end of the end-to-endconnection. Virtual lanes are flow-controlled by the receiving end ofeach hop. In particular, a node that receives traffic via an end-to-endconnection or single hop may issue credits allowing the transmitting end(of the connection or hop) to send a specified amount of traffic.

A QP credit is generally issued for each message (e.g., one creditequals one message of up to 2³² bytes), and each message may besegmented into one or more InfiniBand packets. For example, one messagemay correspond to one Ethernet packet to be encapsulated in one or moreInfiniBand packets and passed to an external network. VL credits aregenerally in the form of blocks (e.g., sixty-four bytes per credit).When the receiving end of a QP or VL issues a credit, it is generallyunderstood that an amount of storage space sufficient to store thecorresponding amount of traffic will be available when the traffic isreceived. If storage space is not available, the QP at the receiving endmay instruct the sender to retry the communication later. A VL reports aflow control error and then drops the packet.

The InfiniBand specification implies that each QP and each VL should beserviced at its receiving end by a separate FIFO (First-In, First-Out)queue. However, providing dedicated queues requires each queue pair andvirtual lane to be provided with worst-case buffering to accept amaximum burst of traffic. This scheme results in an inefficient use ofmemory space because, at any given time, not every active QP or VL willeven be configured, much less receiving enough traffic to require a fullset of buffers, and therefore storage space dedicated to a particular(e.g., non-busy) QP or VL may be wasted. Thus, a need exists for asystem and method for sharing buffers between multiple queue pairs ormultiple virtual lanes, and/or between queue pairs and virtual lanes.

A shared storage space for virtual lane and queue pair traffic may allowmore flexibility and scalability, but it would still be necessary tosupport flow control. For example, with shared storage space, the amountof storage used by each VL and QP should be tracked in order tocalculate how many credits the receiving end can or should issue.Depending on whether any storage space is dedicated to a queue pair orvirtual lane, or how much shared space is available for use by any queuepair or virtual lane, supporting flow control may become problematic.Thus, there is a need for a system and method for facilitating flowcontrol in association with a memory configured for shared buffering ofqueue pairs and/or virtual lanes.

Further, at an interconnection between an InfiniBand fabric and anexternal system (e.g., an Ethernet network or other communicationsystem), the use of discrete FIFO queues for each terminating QP (and/orVL) means that traffic to be transferred from a QP to the externalsystem must be copied from its InfiniBand QP queue into a differentqueue or data structure for the external system (e.g., a networktransmit module) before the traffic can be transmitted externally. Thisdelays the transfer and causes additional inefficiency. Thus, there is aneed for a system and method for avoiding inefficient memory operationswhen transferring communications between InfiniBand and an externalsystem.

Also, if a single receive queue is used to store mixed types of trafficfor a queue pair or other type of communication connection, a system andmethod are needed for interleaving the different types of traffic whileavoiding the possibility of transferring traffic out of order. Forexample, a queue pair's traffic may include Send commands containingencapsulated outbound communications (e.g., Ethernet packets), Sendcommands containing RDMA Read descriptors (e.g., for retrieving outboundcommunications), responses to RDMA Reads, etc. Thus, different types oftraffic should be handled without causing out of order processing ofoutbound communications.

A system and method are also needed to track responses to RDMA Readoperations, so that a corresponding entry in a retry queue can beretired when all responses are received.

SUMMARY

A system and method are provided for mapping outbound communicationsfrom InfiniBand queue pairs (QP) and/or virtual lanes (VL) to portsthrough which they are to be transmitted to an external communicationsystem (e.g., an Ethernet network). In a channel adapter or otherinterface device, a memory is shared between the InfiniBand receive side(i.e., where packets are received from the InfiniBand fabric) and thetransmit side (i.e., where communications are transmitted to theexternal system).

In one embodiment of the invention, each queue pair terminating at thechannel adapter has an associated set of pointers or registersidentifying the beginning and end of a linked list for storing contentsof InfiniBand packets in the shared memory. Thus, an encapsulatedcommunication (e.g., an encapsulated Ethernet packet) is reassembled inthe shared memory, as it is received, by chaining together as manyshared memory buckets as are needed for the communication.

A shared control structure facilitates management of the linked list.Illustratively, the linked list is composed of entries in the controlstructure, wherein each entry stores a value identifying both the nextcontrol entry in the list and a memory “bucket” associated with theentry. Each queue pair's pointers include a head pointer identifying thefirst control entry and memory bucket, and a tail pointer identifyingthe last control entry and memory bucket in the queue pair's linkedlist.

When a communication is reassembled in the shared memory, pointersidentifying the corresponding sub-linked list are transferred to anoutbound port (e.g., a port for transmitting the communication onto anexternal system or communication link). For example, pointersidentifying the beginning (i.e., first control entry and first memorybucket) and end (i.e., last control entry and last memory bucket) of thecommunication may be passed to a network transmit module. The pointersmay be re-linked, possibly in a new order, to populate a linked list forthe outbound port. Thus, the shared memory is used to queue not onlyincoming InfiniBand traffic, but also outgoing traffic. One result isthat it is unnecessary to copy an outgoing communication between inboundand outbound queues.

DESCRIPTION OF THE FIGURES

FIG. 1 is a block diagram depicting a computing device in which trafficreceived from multiple queue pairs and virtual lanes are buffered in asingle shared memory, in accordance with an embodiment of the presentinvention.

FIG. 2 is a block diagram of memory structures for facilitating thecombined buffering of queue pair and virtual lane traffic, in accordancewith an embodiment of the invention.

FIG. 3 is a flowchart illustrating one method of storing InfiniBandtraffic from multiple queue pairs and virtual lanes in a shared memory,in accordance with an embodiment of the present invention.

FIG. 4 is a block diagram of an InfiniBand receive module, according toone embodiment of the invention.

FIG. 5 is a block diagram of a flow control portion of an InfiniBandlink core, showing its interaction with a Resource Manager, according toone embodiment of the invention.

FIG. 6 is a graph demonstrating one method of setting thresholds andcorresponding amounts of advertisable message credits, according to oneembodiment of the invention.

FIG. 7 is a flowchart illustrating one method of applying flow controlto InfiniBand traffic received from multiple queue pairs and virtuallanes and stored in a shared memory structure, in accordance with anembodiment of the present invention.

FIG. 8 is a flowchart illustrating one method of mapping InfiniBandcommunications to an external communication system, in accordance withan embodiment of the present invention.

FIG. 9 is a block diagram of a queue pair queue configured toaccommodate mixed types of traffic without causing out-of-order receipt,according to one embodiment of the invention.

FIG. 10 is a flowchart illustrating one method of processing trafficreceived in the queue pair queue of FIG. 9, according to one embodimentof the invention.

FIG. 11 is a block diagram of a memory structure for maintaining linkedlists for tracking receipt of responses to RDMA Read operations,according to one embodiment of the invention.

FIG. 12 is a flowchart demonstrating one method of tracking receipt ofresponses to RDMA Read operations, according to one embodiment of theinvention.

DETAILED DESCRIPTION

The following description is presented to enable any person skilled inthe art to make and use the invention, and is provided in the context ofparticular applications of the invention and their requirements. Variousmodifications to the disclosed embodiments will be readily apparent tothose skilled in the art and the general principles defined herein maybe applied to other embodiments and applications without departing fromthe scope of the present invention. Thus, the present invention is notintended to be limited to the embodiments shown, but is to be accordedthe widest scope consistent with the principles and features disclosedherein.

The program environment in which a present embodiment of the inventionis executed illustratively incorporates a general-purpose computer or aspecial purpose device such as a hand-held computer. Details of suchdevices (e.g., processor, memory, data storage, display) may be omittedfor the sake of clarity.

It should also be understood that the techniques of the presentinvention may be implemented using a variety of techniques. For example,the methods described herein may be implemented in software executing ona computer system, or implemented in hardware utilizing either acombination of microprocessors or other specially designed applicationsspecific integrated circuits, programmable logic devices, or variouscombinations thereof. In particular, the methods described herein may beimplemented by a series of computer-executable instructions residing ona suitable computer-readable medium. Suitable computer-readable mediamay include volatile (e.g., RAM) and/or non-volatile (e.g., ROM, disk)memory.

Introduction

In one embodiment of the invention, a system and method are provided forbuffering traffic received via InfiniBand queue pairs (QP) and virtuallanes (VL) in a single shared memory structure. Memory buckets orelements are dynamically allocated as needed. For each active queuepair, a linked list of memory buckets is formed for storing traffic fromthat queue pair. Thus, instead of a fixed number of queues orfixed-size, dedicated queues (e.g., FIFO queues), each QP has adynamically sized linked list that can be reconfigured to supportvarying numbers of virtual lanes and queue pairs, and each resultinglinked list can be easily measured and manipulated. Each queue pair'svirtual lane membership is noted, thereby facilitating measurement ofthe amount of traffic in the shared memory for each active virtual lane.

In another embodiment of the invention, a system and method are providedfor facilitating flow control of queue pairs and/or virtual lanes,wherein the queue pair and virtual lane traffic is buffered in a sharedmemory structure. In this embodiment, depths of the queue pairs andvirtual lanes are measured, and a decision whether to accept a newpacket, or issue a credit, may be made on the basis of whether there issufficient room in the shared memory structure for the packet's queuepair or virtual lane.

In yet another embodiment of the invention, a system and method areprovided for sharing a memory between the receiving end of InfiniBandnetwork communication connections (e.g., queue pairs, virtual lanes) andthe transmitting end of a communication network system or link externalto the InfiniBand network (e.g., an Ethernet network). The memory may beused for combined buffering of receive queue pairs and/or virtual lanesvia linked lists, but also comprises linked lists for one or moreoutbound ports. A communication can be queued for transmission (e.g.,after being reassembled in the shared memory) by simply copying, movingor re-arranging pointer or register values, rather than copying theentire communication.

In another embodiment of the invention, a system and method are providedfor mixing traffic having different transfer protocols in one queue,while avoiding out-of-order processing of the traffic. The queue may befor an InfiniBand queue pair, and may be implemented as one or morelinked lists. For example, such a queue may store Send commandsencapsulating outbound communications and Send commands encapsulatingRDMA (Remote Direct Memory Access) Read descriptors for retrievingoutbound communications. Each command is processed, and its associatedcommunication (e.g., an Ethernet packet) forwarded for transmission, inorder.

In another embodiment of the invention, a system and method are providedfor tracking responses to an RDMA Read operation. Illustratively, linkedlists may be maintained for different queue pairs, with each linked listentry storing the range of Packet Sequence Numbers (PSN) associated withthe expected responses to the RDMA Read. When the last response isreceived, the linked list entry may be removed.

Embodiments of the invention are described below as they may beimplemented for InfiniBand traffic traversing queue pairs and virtuallanes. Other embodiments of the invention may be configured andimplemented for other types of communication architectures or protocols,such as PCI (Peripheral Component Interconnect) Express, AsynchronousTransfer Mode (ATM), Ethernet and, in general, any packetized datatransfer scheme that multiplexes different independent packet streamsonto a shared medium using “Send” or RDMA protocols.

Combined Buffering of Virtual Lanes and Queue Pairs

In one embodiment of the invention, a shared memory structure is used tostore traffic received at a computing device from an InfiniBand fabricor network. The memory structure is shared among multiple queue pairsthat define end-to-end connections between the computing device andother InfiniBand nodes. The queue pairs may be members of any virtuallane(s) reaching the computing device. The shared memory structure ismanaged as a set of linked lists maintained outside the shared memorystructure, thereby allowing traffic from multiple queue pairs and/orvirtual lanes to be stored and reassembled in the same structuresimultaneously. Thus, there is no need to maintain separate and/ordedicated memory structures for each queue pair and/or virtual lane. Inone implementation, the traffic is transmitted from the same structureafter being reassembled into an outgoing communication (e.g., anEthernet packet).

In this embodiment, the amount of traffic stored for a given queue pairat a particular time may be measured by examining that queue pair'slinked list. A determination of the amount of traffic in the sharedmemory for one virtual lane may be facilitated by monitoring the virtuallane membership of each queue pair and accumulating the sizes of thelinked lists for each queue pair in the virtual lane.

FIG. 1 is a block diagram of a computing device in which this and otherembodiments of the invention may be implemented. Although theseembodiments are described as they may be configured for transferringcommunications between an InfiniBand fabric and an Ethernet network,other embodiments may be configured for interfacing between other typesof communication networks, systems or components, such as SONET(Synchronous Optical Network) for Internet Protocol (IP), POS (Packetover SONET), PCI Express or SONET/SDH (Synchronous Digital Hierarchy).

In FIG. 1, computing or communication device 102 is coupled toInfiniBand fabric 104, and is also coupled to Ethernet network 106 orsome other external communication system or component. Any number ofvirtual lanes may be configured to be active between device 102 andswitches or other link partners within fabric 104. Similarly, any numberof queue pairs may be configured to be active between device 102 (orcomponents of device 102) and other nodes within the InfiniBand fabric.The queue pairs may be reliable connected queue pairs (RCQPs).

Device 102 includes channel adapter 110 (e.g., a target channeladapter), which is configured for communication with nodes withinInfiniBand fabric 104. Channel adapter 110 comprises control 112, memory114, InfiniBand Link Core 118, InfiniBand Receive Module (IRX) 120,Network Transmit Module (NTX) 130 and external port(s) 116. IRX 120includes queue pair pointers 122 for queue pairs' linked lists, whileNTX 130 includes transmit pointers 132 associated with queues forexternal ports 116. Through external port(s) 116, channel adapter 110can transmit Ethernet packets and/or other communications onto network106.

InfiniBand Link Core 118 performs link-level flow control using creditinformation, as described below.

IRX 120 handles incoming packets from InfiniBand fabric 104. Queue pairpointers 122 comprise registers or pointers for managing queues for eachactive queue pair. As described below, a queue pair's queue may compriselinked lists of entries in control 112 and memory 114. A queue pair'slinked list is used to manage the reassembly, in memory 114, ofsegmented outbound communications from the contents of one or moreInfiniBand packets processed by IRX 120. IRX 120 also stores queue pairstate information (possibly with queue pair pointers 122) and virtuallane state information. Further details of an InfiniBand Receive Moduleare described below, in conjunction with FIG. 4.

NTX 130 processes outbound communications after they are reassembled inmemory 114, for transmission via an external port 116. An external portmay offer Quality of Service (QoS) options by maintaining separateoutput queues for each defined QoS; access to the queues may bearbitrated via weighted fair queuing or other arbitration schemes.

Illustratively, transmit pointers 132 correspond to one or more linkedlists of reassembled communications awaiting transmission. For example,for each queue (e.g., QoS queue) of an external port, transmit pointers132 may include a separate set of registers or pointers for managing alinked list (within control 112 and memory 114) of communicationsawaiting transmission. Methods of transferring outbound communicationsbetween InfiniBand fabric 104 and network 106, through a channel adaptersuch as channel adapter 110, are discussed in a following section.

In one implementation of the embodiment of the invention depicted inFIG. 1, channel adapter 110 is capable of operating in any of two ormore modes. In one mode, a single external port 116 is operated at adata rate of approximately 10 Gbps. In another mode, multiple (e.g., 4)external ports 116 are operated, each at a data rate of approximately 1Gbps.

In the illustrated embodiment of the invention, as InfiniBand packetsare received at computing device 102, over various queue pairs andvirtual lanes, contents of the packets are stored or reassembled viamemory 114 and control 112. Thus, one contiguous memory structure (i.e.,memory 114) is used to buffer packets for multiple queue pairs andvirtual lanes, rather than implementing a separate structure (e.g., FIFOqueues) for each.

In this embodiment of the invention, control 112, memory 114, IRX 120and NTX 130 reside on one chip or integrated circuit (e.g., an ASIC). Inother embodiments, multiple chips may be used and/or the illustratedelements of the channel adapter may be configured differently.

FIG. 2 depicts details of a channel adapter such as channel adapter 110of FIG. 1 in greater detail, according to one embodiment of theinvention. Although the outbound path of communications (i.e., fromInfiniBand to an external system) is discussed herein, the channeladapter is also configured to handle incoming communications (i.e., fromthe external system to the InfiniBand fabric).

In FIG. 2, memory 204 is a memory structure (e.g., a multi-port RAM)configured to store traffic received via various queue pairs and virtuallanes, from any number of InfiniBand nodes and link partners, forreassembly into communications destined for an external communicationsystem or component. Each queue pair's traffic may be stored as a linkedlist of memory locations. Control 202 is a separate memory or datastructure for managing linked lists of each queue pair's traffic storedin memory 204.

Illustratively, the traffic comprises contents of InfiniBand packetsconfigured to carry encapsulated Ethernet packets from InfiniBand nodesfor transmission on the external system. The packets may includeInfiniBand Send commands (encapsulating Ethernet packet segments or RDMARead descriptors), RDMA Read commands and/or other types of packets.

For each queue pair that is active on the channel adapter, queue pairpointers 210 include (at least) a head and tail pointer to identify thebeginning and end of the queue pair's linked list. Thus, QP2 head 212 aand QP2 tail 212 b are pointers for a linked list associated with aparticular queue pair. Similarly, transmit pointers 220 includes a setof head and tail pointers for each queue of an outbound port. Queue pairpointers 210 and/or transmit pointers 220 may be stored in registers orother structures. Other information may also be stored for each queuepair or outbound queue, such as the virtual lane that a queue pairbelongs to, other pointers, etc.

Each queue pair's and outbound queue's linked list comprises a series ofcorresponding entries in control 202 and associated memory buckets inmemory 204. A set of memory buckets in memory 204 corresponding to aparticular linked list may be considered to constitute a queue (e.g.,for the associated queue pair and/or virtual lane). A “bucket” in thiscontext comprises a set of lines in a RAM that have a common value fortheir most significant address bits. The number of other, leastsignificant, address bits may determine the size of a bucket (i.e., thenumber of lines or bytes in the bucket).

Control 202 and memory 204 may include an equal number of entries. Thus,in the implementation depicted in FIG. 2, control 202 comprises 1,024(1K) entries, and memory 204 comprises 1,024 (1K) buckets. Each controlentry includes a 10-bit value, which is used to identify the nextcontrol entry in the linked list and the corresponding next bucket. Acontrol entry may also contain other information (e.g., an ECC code).

The control structure may be protected by a number of techniques, usedin combination or separately. These techniques may include physicalseparation of bits in the same control entry in order to prevent doublebit errors, implementation of a SECDED (Single Error Correct, DoubleError Detect) Error Correction Code (ECC), etc. The SECDED codeprotection can be extended to include the address of the controlstructure entry, thereby protecting the data from being written or readfrom the wrong location due to an addressing error while accessing thecontrol structure.

In FIG. 2, each data line in memory 204 is 128 bits (16 bytes) wide, andeach bucket includes eight lines. Thus, the bucket size is 128 bytes,and the size of memory 204 is 128 Kbytes.

In other embodiments of the invention, control 202 and memory 204 may beof virtually any size and the configuration of a control entry and abucket may vary. For example, the size of a bucket or a line in a bucketmay be configured based on the size (e.g., average size) of anInfiniBand packet payload. In addition, the size and configuration ofmemory 204 may differ, depending on whether it is implemented on thesame chip or component as other elements, or is implemented as anexternal memory. For example, an external memory of 4 MB may be used,with bucket sizes of 2 KB.

In FIG. 2, QP2 head 212 a is the head pointer for a first queue pair,and therefore identifies the first control entry for QP2—e.g., entry i.QP2 head 212 a also identifies the first memory bucket for QP2—bucket i.A value stored in control entry i (i.e., the value 1023) identifies thenext control entry for the linked list and the next bucket—number 1023.Similarly, control entry 1023 identifies the next control entry andcorresponding bucket (i.e., m). In the implementation of FIG. 2, controlentry 0 is a null pointer. This entry may therefore be used to terminatea linked list.

QP2 tail 212 b also identifies control entry m and bucket m, thusindicating where the next set of data (e.g., the payload of the nextInfiniBand packet for QP2) should be stored. Information concerning howfull a bucket is may be stored in queue pair pointers 210 or some otherlocation.

For example, this information may be stored in the first line of thefirst bucket allocated to each outbound communication stored in thelinked list. Additional information (e.g., queue pair number, virtuallane identifier, outbound port/queue identifier) may be stored before,after or as part of a communication reassembled in memory 204. Suchinformation may be used to help process or transmit the communicationcorrectly.

Illustratively, InfiniBand payloads are stored contiguously, within andacross buckets, from the beginning to the end of one outboundcommunication (e.g., one encapsulated Ethernet packet). When the end ofone communication is reached, a new bucket (and new control memoryentry) may be started for that queue pair's linked list. In analternative embodiment of the invention, portions of multiple differentoutbound communications may be stored in a single memory bucket.

A given control entry may be considered to be associated with, orcorrespond to, the memory bucket at the same position in a queue pair'slinked list. Thus, in FIG. 2, control entry i is associated with memorybucket i, control entry m corresponds to memory bucket m, and so on.

In an embodiment of the invention, linked lists of outboundcommunications (e.g., communications that have been reassembled),anchored by head and tail pointers in transmit pointers 220 (e.g., PortAhead pointer 222 a and PortA tail pointer 222 b), are maintained in thesame way. Thus, each of control 202 and memory 204 are multi-portedstructures in FIG. 2.

Free head 230 a and free tail 230 b are pointers used to maintain alinked list of free control entries and buckets. Thus, free head 230 aidentifies a first free control entry and a corresponding first freebucket in a free list, while free tail 230 b identifies the last controlentry and the last free bucket in the list. Free control entries andbuckets may be removed from the head (or first) end and returned to thetail (or last) end of the free list. Similarly, buckets may be removedfrom a queue pair's linked list of buckets at the head end and returnedat the tail end.

FIG. 3 demonstrates a method of sharing a single memory structure tostore InfiniBand traffic from multiple queue pairs and virtual lanes,according to one embodiment of the invention.

In operation 302, an InfiniBand packet is received at a channel adapterof a device coupled to an InfiniBand fabric and an externalcommunication system (e.g., an Ethernet network). In this embodiment,the packet contains all or a portion of an encapsulated Ethernet packet.

In operation 304, InfiniBand packet validation rules are applied todetermine whether the packet is valid.

In operation 306, if the packet is a valid InfiniBand packet the methodcontinues to operation 308; otherwise, the method advances to operation322.

In operation 308, the virtual lane and queue pair on which theInfiniBand packet was received are identified. Illustratively, theservice level or virtual lane associated with the packet may affect theQoS afforded the Ethernet packet when it is transmitted on an outboundport.

In operation 310, the tail of the linked list for the packet's queuepair is located. In this embodiment, a pointer to the tail is maintainedas part of a per-queue pair collection of data. The tail identifies thebucket in the shared memory in which the last packet payload was storedand the corresponding entry in a shared control structure thatfacilitates management of the linked list.

In operation 312, it is determined whether there is space in the sharedmemory structure for storing contents of the packet. If so, theillustrated method continues with operation 314; otherwise, the methodadvances to operation 322. A method of monitoring the amount of space inthe memory for storing packets from different queue pairs is describedin a following section.

In operation 314, the payload of the InfiniBand packet is stored in thememory structure. In this embodiment, entries in the shared controlstructure for the shared memory structure contain information regardingthe status of the bucket that corresponds to the entry. Thus, it canreadily be determined where in the bucket the payload should be storedand whether the entire payload will fit in the bucket. Illustratively,if the payload comprises the first fragment or portion of an outboundcommunication, or a set of RDMA Read descriptors for retrieving acommunication, a new bucket may be used. Otherwise, the payload isstored contiguously with the previous payload for the communication.

In operation 316, the queue pair's linked list and possibly other listsor information are updated as necessary. For example, if a new memorybucket is needed to accommodate the payload, a bucket may be taken froma list of free (available or empty) memory buckets. The bucket and a newcorresponding entry in the control structure are initialized asnecessary and added to the QP's linked list.

In operation 318, depth indicators (e.g., pointers, counters) for thepacket's queue pair and/or virtual lane may be updated as necessary toindicate how much traffic is currently stored in the shared memory forthe queue pair and/or virtual lane. Queue Pair and/or virtual lanecredits may be issued if warranted. The illustrated method then ends.

In operation 322, the received packet is either invalid (e.g., containsan unrecoverable error) or there is no space to store the packet payloadin the shared memory. In this embodiment of the invention, the packet istherefore discarded. In other embodiments, other action may be taken.

Receive Flow Control with Combined Buffering of Virtual Lanes and QueuePairs

In one embodiment of the invention, a system and method are provided forfacilitating flow control of InfiniBand receive traffic, at the linklayer and/or transport layer, when traffic received via virtual lanesand queue pairs are buffered in a single memory structure. Animplementation of this embodiment is suitable for use with sharedbuffering as described in the preceding section, and the channel adapterdescribed in conjunction with FIGS. 1 and 2.

In this embodiment, to properly apply flow control to queue pairs and/orvirtual lanes, the amount of traffic stored in the shared memory foreach active queue pair and/or virtual lane is tracked. As describedabove, linked lists may be maintained for each queue pair, therebyfacilitating each queue pair's usage of the shared memory. And, bynoting each queue pair's virtual lane membership, the total memory usageof all queue pairs within a particular virtual lane can be easilycalculated.

In an embodiment of the invention, a dedicated portion of the sharedmemory structure may be allocated to a given queue pair or virtual lane.And, queue pairs and virtual lanes allocated a dedicated portion of thememory may or may not be permitted to also use a shared portion of thememory that can be drawn upon by multiple queue pairs and/or virtuallanes. Queue pairs and virtual lanes not allocated dedicated memoryspace use only shared memory for queuing their traffic. Thus, applyingflow control for an individual queue pair or virtual lane will considerthe amount of space available to it, including dedicated and/or sharedspace.

In this embodiment, an InfiniBand Resource Manager (IRM) module, whichmay be part of an InfiniBand Receive Module (IRX), manages the sharedmemory. In particular, the IRM allocates or grants memory buckets (i.e.,units of memory), receives buckets (e.g., after they are used), andperforms other actions to facilitate usage of the shared memorystructure. In particular, it tracks the amount of traffic in the sharedmemory for a channel adapter's queue pairs and virtual lanes. It alsoimplements or facilitates various flow control mechanisms, such as linklayer (virtual lane) credits, transport layer (queue pair) credits,retries and RDMA Read operations. It also maintains various operatingparameters regarding the queue pairs and virtual lanes.

FIG. 4 is a block diagram of an InfiniBand Receive Module (IRX),according to one embodiment of the invention. The IRX is part of achannel adapter or other device used to interface a computing orcommunication device to an InfiniBand fabric, and contains a sharedmemory structure providing common buffering for multiple queue pairsand/or virtual lanes.

In FIG. 4, IRX 402 includes InfiniBand Resource Module (IRM) 410,Receive Packet Processor (RPP) 412, Post Packet Processor (PPP) 414,acknowledgement generator 416, Link List (Receive) Manager (LLRM) 418and CPU interface 420, in addition to a collection of queue pairpointers (not shown in FIG. 4).

IRM 410 includes queue pair memory (or memories) 430 and virtual lanememory (or memories) 432, and interfaces with Network Transmit Module(NTX) 404 and InfiniBand Link Core (ILC) 406. Not shown in FIG. 4 arethe shared memory and shared control structures (e.g., memory 114 andcontrol 112 of FIG. 1) in which queue pairs' queues (i.e., linked lists)are maintained.

In one embodiment of the invention, IRM 410 supports four virtual lanesfor each receive port of the channel adapter on which the IRM resides,in addition to always-present virtual lane 15 (which is dedicated tomanagement traffic). The channel adapter may operate in a single-port ordual-port mode.

In this embodiment, up to 64 user-assignable active queue pairs may besupported by IRM 410, with queue pairs zero and one being reserved formanagement traffic. In other embodiments, other quantities of virtuallanes and queue pairs may be supported by an InfiniBand Resource Module(e.g., up to 2²⁴).

In FIG. 4, RPP 412 requests and receives resources (e.g., memorybuckets, entries in the control structure) from IRM 410 for new packetsreceived at the channel adapter. For example, RPP 412 may notify IRM 410of a need to store a payload of a new packet, and may indicate theamount of space needed. IRM 410 may then allocate or reserve asufficient number of memory buckets for the payload. The RPP alsofacilitates the storage of data received via RDMA Read operations, byqueuing RDMA Read descriptors for example. RPP 412 may return unusedbuckets to the IRM if, for example, the packet is dropped or rejected(e.g., because of an error). RPP 412 may also recognize the latedetection of an error in a packet and return allocated resources if thepacket must be rejected.

PPP 414 evaluates the size of an RDMA Read descriptor queued by the RPP,and signals IRM 410 to reserve the necessary resources. The resourcesare reserved for that RDMA Read and, when the operation occurs, the RPPrecognizes the operation and matches the reserved resources with theoperation. Thus, an RNR-NAK should never need to be issued for an RDMARead operation.

Acknowledgement generator 416 generates fields of an InfiniBand ACK(acknowledgment) or NAK (negative acknowledgement) packet, andconstructs and forwards ACK packets of transport layer flow controlinformation to an InfiniBand Transmit (ITX) module (e.g., to advertisemessage credits, issue an RNR-NAK). For example, the acknowledgementgenerator may query IRM 410 to determine how much storage space isavailable for a particular queue pair, and report a corresponding numberof available queue pair credits to the ITX.

LLRM 418 maintains linked lists of used and unused memory buckets andcontrol entries. Illustratively, IRM 410 passes returned buckets to LLRM418 for addition to the free list. As shown in FIG. 2, a head and tailpointer may be maintained for managing the linked list of free buffers.

CPU interface 420 facilitates the configuration of various registerand/or memory settings in IRM 410 and/or other modules. Via the CPUinterface, IRM 410 is notified of new queue pairs and/or virtual lanesto be established. Illustratively, the IRM is informed of the amount ofspace needed for the new queue pair or virtual lane (e.g., an initialallocation of buckets) and will reserve that space if it is available,or will assemble or aggregate the necessary space as it becomesavailable (e.g., as used buckets are returned).

As described in a previous section, NTX 404 transmits outboundcommunications after they have been reassembled in the shared memory.The NTX notifies IRM 410 when the buckets used by a transmittedcommunication can be reclaimed.

ILC 406 handles link layer flow control for IRX 402. IRM 410 notifiesthe ILC of the space available for virtual lanes, and the ILC can thenissue an appropriate number of link layer credits on each virtual lane.

More particularly, link level flow control in an embodiment of theinvention depends on the allocation of buffers to each virtual lane (foruse by the queue pairs that belong to each virtual lane), and theissuance and redemption of credits for traffic traversing the virtuallane. Dynamic programmable threshold registers may be maintained in IRM410 (i.e., memories 430, 432) or elsewhere, to store the amount ofbuffer space currently available for each queue pair and/or virtuallane, and or other information.

More specifically, in one embodiment of the invention, queue pair memory(or memories) 430 stores various parameters for managing operation ofqueue pairs. For example, and as discussed below, dynamic programmablethresholds may be maintained to indicate the amount of buffer space usedby (or available to) a queue pair, programmable amounts of credits aqueue pair may advertise depending on which of the thresholds have beenreached, whether a queue pair is able to used shared memory buffers, amaximum (if any) amount of dedicated buffer space allocated to a queuepair, etc.

Similarly, virtual lane memory (or memories) 432 store operatingparameters for virtual lanes, as described below. For example, memory432 may store the amount of buffer space allocated to each virtual lane.

FIG. 5 demonstrates an apparatus for calculating link level flow controlcredits, according to one embodiment of the invention. This embodimentis suitable for implementation with the InfiniBand Resource Managerdepicted in FIG. 4. Up to sixteen virtual lanes may be implemented inthe illustrated embodiment of the invention.

In FIG. 5, InfiniBand Link Core (ILC) 406 receives, on a per-virtuallane basis, the amount of available buffer space (e.g., in buckets). Avirtual lane's available buffer space may be signaled every time itchanges, or with some other regularity. Illustratively, the buffer spaceavailable for a virtual lane (or queue pair) may change whenever a newpacket or payload is stored (thereby taking up some of the availablespace) and whenever an outbound communication is transmitted (therebyfreeing up space in the shared memory).

The FCTBS (Flow Control Total Blocks Sent) value arrives periodicallyfrom a link partner, and is noted or stored as “blocks received” 502.After a FCTBS value is loaded, blocks received 502 increments inresponse to the arrival of blocks from that link partner. A separate“blocks received” value or register may be maintained for each virtuallane.

For each virtual lane, ILC 406 adds blocks received 502 and the bufferspace available for the virtual lane (e.g., measured in blocks), tocalculate FCCL (Flow Control Credit Limit) 504. FCCL 504 represents themaximum amount of traffic (in credits, one credit per block) the linkpartner on a particular virtual lane may send on that virtual lane. FCCL504 is periodically transmitted to the link partner.

The link partner, when it wants to send data, determines whether it hasany credits available. For example it may subtract the total blocks senton the link from FCCL. It cannot send the data if the difference is lessthan or equal to zero.

Because the buffer space that is available for a given virtual lane iscontinuously updated, and the blocks received on the virtual lane arealso continuously updated, FCCL 504 represents the additional amount oftraffic that can be accepted for the virtual lane.

In this embodiment of the invention, for each virtual lane, severalvalues are maintained (e.g., in virtual lane memory 432 of FIG. 4), suchas; VL_enabled, which indicates whether the virtual lane is enabled(e.g., active); VL_threshold, which identifies the maximum amount ofbuffer space (e.g., in buckets) that the virtual lane may use; andVL_queued, which identifies the current amount of buffer space (e.g., inbuckets) that the virtual lane is using. These values are initializedwhen the virtual lane is established or reset.

As contents of InfiniBand data packets are stored in the shared memory,VL_queued is incremented and compared to VL_threshold. If VL_thresholdis exceeded, the available buffer space for that virtual lane that isreported to ILC 406 by IRM 410 is zero. Otherwise, the differencebetween VL_queued and VL_threshold is reported.

In one alternative embodiment of the invention, the amount of bufferspace available for a virtual lane may be calculated by aggregating thebuffer space available for each queue pair within the virtual lane. Amethod of determining the amount of buffer space available to a queuepair (shared space and/or dedicated space) is described below.

In one embodiment of the invention, the total available buffer space(e.g., in the entire shared memory structure) is divided between virtuallanes based on such factors as the quality of service associated with avirtual lane, arbitration priorities of the virtual lanes, the number ofqueue pairs belonging to a virtual lane, etc. Not all of the storagespace of the shared memory structure need be allocated to active virtuallanes. Some may be reserved to allow a virtual lane to temporarilyexceed its allocation, to facilitate the establishment of a new virtuallane or queue pair, or for some other reason.

Further, the amount of space allotted to a virtual lane is programmable,and over-subscription of buffer space may be permitted. The amount ofbuffer space allocated to a management virtual lane (e.g., virtual lanefifteen) may be minimal, such as 384 bytes—enough to store one 256-bytepayload plus an InfiniBand header, as required by the InfiniBandspecification—or more.

In an embodiment of the invention in which the shared memory structureis an internal memory 128 KB in size, with each bucket being 128 bytes(see FIG. 2), illustrative virtual lane parameter values are as follows.If only two virtual lanes are active—e.g., virtual lanes zero andfifteen—VL_enabled will be true (i.e., 1) for those two virtual lanesand false (i.e., 0) for all others. For the two active virtual lanes,VL_queued is initially set to zero. Illustrative VL_threshold values are1,016 (0x3F0) buckets for virtual lane zero and four buckets for virtuallane fifteen. VL_queued and VL_threshold are meaningless for inactivevirtual lanes.

As another example, if four virtual lanes are active for data (e.g.,virtual lanes zero through three), in addition to virtual lane fifteen,illustrative parameters are as follows. VL_enabled is true for theactive virtual lanes, and false for all others. VL_queued is zero forvirtual lane fifteen and zero for the other active virtual lanes.VL_threshold is four buckets for virtual lane fifteen and 252 (0x0FC)buckets for the other active virtual lanes.

In an embodiment of the invention, besides the use of link credits forflow controlling at the link layer, one or more end-to-end flow controlmechanisms may be implemented at the transport layer. Illustrativeend-to-end flow control mechanisms that may be applied include queuepair credits and RNR-NAK (Retry, Not Ready, Negative AcKnowledgement),both of which may be issued on a per-queue pair basis. Allocation ofspace for RDMA Read responses prior to request may be considered anotherend-to-end flow control mechanism.

End-to-end credits are issued for each InfiniBand message that thereceiver is willing to accept. However, the InfiniBand standard definesa message as being of any length between 2⁰ and 2³² bytes. Therefore, topromote efficient and fair use of the shared memory, the number ofdedicated and/or shared memory buckets a queue pair may consume areprogrammable. Illustratively, as the amount of buffer space (e.g.,memory buckets) a queue pair consumes increases past programmablethresholds, the number of end-to-end credits it may advertise isdetermined by corresponding programmable values. The programmablethreshold values and credits may be stored, per-queue pair, in theInfiniBand Resource Manager module (e.g., in queue pair memories 430 ofFIG. 4).

Thus, embodiments of the invention provide programmability to allowcompromises between disparate goals of good link bandwidth utilization,low retry rate, good buffer utilization, RDMA versus Send modes for datatransferred on a queue pair, etc.

FIG. 6 is a graph demonstrating how programmable thresholds andassociated queue pair credit values may be arranged, according to oneembodiment of the invention. In the graph of FIG. 6, the x-axisrepresents InfiniBand end-to-end credits (also termed message credits orqueue pair credits) that a node may advertise for a queue pair. They-axis represents buffer space, which may be measured in buckets.

The graph is divided into two portions, with the lower portionaddressing the allocation of dedicated buffer space and the upperportion covering the allocation of shared buffer space. Maximumdedicated threshold 616 separates the two portions, and represents themaximum amount of buffer space dedicated to a particular queue pair. Aqueue pair may not be authorized or enabled to use shared buffer spaceand, if not authorized, would therefore not have an upper portion of thegraph.

Maximum dedicated threshold 616 may be any value between zero and thesize of the shared memory structure, inclusive. Any queue pair having amaximum dedicated threshold of zero uses only shared buffer space, andtherefore has no lower portion of the graph and may always contend forbuffer space with other queue pairs.

Below maximum dedicated threshold 616, a queue pair is initially able toadvertise an amount of credits equal to maximum dedicated credits 610(e.g., after being established or reinitialized). Once the amount ofdedicated buffer space used by the queue pair reaches a first threshold(e.g., dedicated threshold 612 a), the number of credits it canadvertise decreases (e.g., to dedicated credits 614 a). Any number ofsimilar thresholds (e.g., threshold 612 b) and credits (e.g., dedicatedcredits 614 b) may be set between zero and maximum dedicated threshold616.

When the amount of dedicated buffer space used by the queue pair reachesmaximum dedicated threshold 616, the queue pair can no longer advertisecredits unless it is enabled to use shared buffer space, in which caseit advertises credits according to the upper portion of the graph inFIG. 6. Otherwise, it must send RNR-NAK packets directing senders to trysending their data later.

The upper portion of the graph is also marked by a series of thresholdsand corresponding amounts of buffer space (e.g., credits). When firstallowed access to shared buffer space, a queue pair may advertise anamount of space indicated by maximum shared credits 620. Thereafter, asthe amount of used shared buffer space increases past programmedthresholds (e.g., shared thresholds 622 a-622 e), the amount of bufferspace or credits the queue pair can advertise decreases accordingly(e.g., shared credits 624 a-624 e). In another embodiment of theinvention, each queue pair has a “weighting” factor used to modify theadvertised shared credit values.

The shared threshold values indicated in FIG. 6 measure the total bufferspace consumed by all queue pairs authorized or programmed to use sharedbuffer space. When maximum shared threshold 626 is reached, all queuepairs can no longer advertise credits, and must send RNR-NAKs. In oneembodiment of the invention, back-off periods specified in a queuepair's RNR-NAK packets may be incremented, in successive packets, untila retry after a particular back-off period succeeds. Upon successfulback-off, the back-off period for an individual queue pair may be resetto a default value. The back-off increments may increase linearly,exponentially or in some other fashion.

Note that the amount of credits a queue pair may advertise may increasewhen the queue pair exhausts its dedicated buffer space and starts usingshared buffer space. That is, maximum shared credits 620 may be greaterthan a final dedicated credits value (e.g., dedicated shared credits 614b). The number of message credits a queue pair may advertise may bereported to the other end of the queue pair by an acknowledgementgenerator (e.g., acknowledgement generator 416 of FIG. 4).

Each queue pair's thresholds and credit limits may differ; therefore,each queue pair's dedicated region (i.e., lower portion) of the graphmay be different. However, in a present embodiment of the invention,each queue pair enabled to use the shared buffer space applies the samethresholds and credit limits in the shared region (i.e., upper portion).

Various criteria may be considered when selecting and programmingappropriate thresholds and credits for a queue pair. And, the memorystructure used for buffering queue pair and/or virtual lanes may beunder- or over-subscribed. Illustratively, any number ofthreshold/credit value pairs may be programmed between the extremes of;(Memorysize_Max_Packet_Size)−Max_Packet_Sizeand:(Memoryjsize_(Max_Packet_Size*Num_QPs))−Max_Packet_Sizewhere Memory_size is the size of the shared memory structure (e.g., inbuckets), Max_Packet_Size is the maximum expected packet size (e.g., inbuckets) and Num_QPs is the number of active queue pairs.

Specific threshold/credit values may depend upon factors such as thetype of traffic being received (e.g., encapsulated Ethernet packets),the amount of buffer space dedicated to a queue pair, the amount ofshared buffer space, etc. A queue pair's threshold/credit values for itsdedicated region of the graph may be stored in a queue pair-specificmemory (e.g., in the IRM module). The shared threshold/credit values forthe shared region may be stored in a globally accessible register orstructure.

In one embodiment of the invention, the maximum dedicated credits valuefor all queue pairs that are active and not dedicated to managementtraffic may be set to the maximum amount of buffer space—e.g., 1,024buckets in the shared memory structure of FIG. 2. A first dedicatedthreshold may be set at one bucket, to decrease the number ofadvertisable credits to 768. A second dedicated threshold may be set attwo buckets, to decrease the number of advertisable credits to 512. Theactive, non-management queue pairs' maximum dedicated thresholds may beset to three buckets, and all may be enabled to use shared buffers.

In this embodiment, the maximum shared credits value may be 1,023, whilethe maximum shared threshold value may be 831, to leave shared bufferspace for completing the reassembly of outbound communications,facilitating establishment of a new queue pair or virtual lane, or forsome other purpose. Illustrative shared threshold/advertisable credittuples may be as follows: <64, 192>, <128, 96>, <256, 48>, <576, 24>,<704, 3> and <768, 1>.

In the embodiment of the invention illustrated in FIG. 6, RNR-NAK is aprimary method of flow controlling queue pairs. An RNR-NAK will be sentif a queue pair's dedicated buffer space is full and it is not permittedto use shared buffers, or if the queue pair's dedicated buffer space isfull, and it is permitted to use shared buffers, but the shared bufferspace is full.

To facilitate an RDMA Read operation, resources may be reserved for theoperation before the RDMA Read is issued. But first the IRM mustdetermine whether the corresponding queue pair has sufficient space.Illustratively, the queue pair's depth is calculated as the number ofbuckets currently in use (i.e., to store payloads of received InfiniBandpackets) plus the number of buckets currently reserved for outstandingRDMA Reads. A new RDMA Read will only be issued if this sum and thequeue pair's programmable thresholds indicate that buffer space isavailable. Space for the RDMA Read will then be allocated from thededicated and/or shared buffer space.

In addition to the programmable threshold and credit values, the numberof outstanding RDMA Read operations a queue pair may have may also beprogrammable, and may be maintained in the IRM or some other module.Other parameters the IRM may store for a queue pair include the queuepair's current depth, whether the last packet received for the queuepair resulted in an RNR-NAK, whether increasing back-off is enabled forRNR-NAK, etc.

In one embodiment of the invention, there is a maximum number ofoutbound communications that may be reassembled in the shared memorystructure at one time. When this maximum number is reached, no new queuepairs (or virtual lanes, in one implementation) may be established untilthe number of communications being reassembled falls below the maximum.Thus, in this embodiment, a programmable amount of buffer space isreserved for completing the reassembly of communications, and themaximum shared threshold value (e.g., threshold 626 in FIG. 6) will beless than the total amount of shared buffer space in the memorystructure.

Illustratively, when used buffer space (e.g., one or more memorybuckets) is returned, the returned space is first added to the amount ofshared space that is available. Then, when the shared space has beenfully restored, or restored past a specified threshold (e.g., dedicatedthreshold 616), space may be returned to individual queue pairs'dedicated regions. The manner in which returned buckets are added toshared or dedicated buffer space may differ in other embodiments of theinvention.

FIG. 7 demonstrates a method of performing link layer and transportlayer flow control for InfiniBand traffic received at a channel adapter,according to one embodiment of the invention. The various virtual lanesand queue pairs share a single memory structure comprising multiplebuckets or buffers that can be dedicated to a virtual lane or queuepair, or that can be part of a pool of shared buckets.

In operation 702, various operating parameters are set that pertain tothe virtual lanes and queue pairs terminating at the adapter. For avirtual lane, the parameters may include the amount of buffer spacecurrently used, the maximum amount that may be used (e.g., the number ofbuffers dedicated to the virtual lane), and whether the virtual lane isactive.

For a queue pair, the parameters may include indications of whether thequeue pair is active and whether it can use the pool of shared buckets.Other possible queue pair parameters include the various dedicated andshared thresholds and matching credit values, the maximum number ofcredits that may be advertised when using dedicated and/or sharedbuckets, an RNR-NAK timer and back-off enable value, a measure of thecurrent amount of memory space (e.g., number of buckets) used by thequeue pair, etc. The various parameters may be stored in an InfiniBandresource manager module.

In operation 704, a new packet is received, and its virtual lane andqueue pair are identified (e.g., by the resource manager or a receivepacket processor module). Some or all of the operating parametersassociated with the virtual lane and/or queue pair may be retrieved.

In operation 706, the size of the packet payload is determined. In thisembodiment, only the packet payload is to be stored in the shared memorystructure. In other embodiments, other contents—such as the entirepacket—may be stored, in which case the size of the whole packet isnoted.

In operation 708, it is determined whether the virtual lane's threshold(e.g., maximum size) would be exceeded if the payload were stored. Ifnot, the method advances to operation 712; otherwise, the methodcontinues with operation 710.

In operation 710, the packet is dropped or rejected. The method thenends.

In operation 712, the queue pair is examined to determine if it canaccept the payload. For example, the current size of the queue pair'squeue (e.g., the number of buckets it uses) may be compared to itsmaximum number of dedicated buckets. Further, if the queue pair ispermitted to draw from the pool of shared buckets, it may be determinedwhether any shared buckets are available. If the queue pair can storethe payload, the illustrated method advances to operation 718.

In operation 714, it is determined whether the queue pair is a reliableconnected queue pair (RCQP). Alternatively, the queue pair may be anunreliable datagram queue pair (UDQP). If the queue pair is an RCQP, themethod continues with operation 716; otherwise, the method concludeswith operation 710.

In operation 716, an RNR-NAK response is sent to the other end of thequeue pair, to direct the sender to retry the packet later. The methodthen ends.

In operation 718, the packet payload is stored and the virtual laneand/or queue pair data are updated accordingly. For example, their queuesizes may be incremented, the linked list for the queue pair may beadjusted (e.g., if a new bucket was put into use), etc.

In operation 720, the number of link and transport layer creditsremaining for the virtual lane and queue pair are calculated. A methodof determining available link layer credits is described above inconjunction with FIG. 5. The number of message credits that can beadvertised for the queue pair may be determined by identifying thelowest dedicated or shared threshold the queue pair's queue size hasexceeded, and retrieving from storage the number of credits associatedwith that threshold.

In operation 722, the link layer and transport layer credits areadvertised to the link partner and connection partner, respectively. Themethod then ends.

Mapping Communications to an External Port, with Combined Buffering ofVirtual Lanes and Queue Pairs

In an embodiment of the invention, a system and methods are provided formapping communications between an InfiniBand queue pair (QP) and acommunication system or component external to the InfiniBand fabric. Forexample, a fabric may be coupled to an external network or communicationsystem (e.g., an Ethernet network) via a computing or communicationdevice comprising an InfiniBand channel adapter, as shown in FIG. 1.

Within the device, communications destined for the external system(e.g., Ethernet packets) are received from the InfiniBand fabric viavarious queue pairs and virtual lanes, stored in a shared memorystructure, and then transferred to the external system. FIG. 2 depictsone implementation of the shared memory structure.

In this embodiment, the shared memory structure is used to reassembletraffic as it is received from the fabric. The memory structure isshared among multiple queue pairs, each of which may have traversed anyvirtual lane (VL) to arrive at the computing device. As described above,the shared memory structure is managed as a set of linked lists, therebyallowing traffic from multiple queue pairs and virtual lanes to use thesame structure simultaneously. When a complete communication isreassembled, the portion of the corresponding queue pair's linked listthat encompasses the communication is transferred to a module configuredto process the communication for transmission (e.g., NTX 130 of FIG. 1).This avoids the need to copy the communication between the inboundInfiniBand queue pair/virtual lane and the outbound port or connection.

In the embodiment of the invention illustrated in FIG. 2, when anoutbound communication is fully reassembled in memory 204, pointersidentifying the buckets in which the communication is stored are copiedto transmit pointers 220 for the appropriate external port. Eachexternal port may have one or more associated queues (e.g., fordifferent qualities of service).

For example, if the reassembled communication was received on queue pair2 and is intended for transmission on port A, the portion of queue pair2's linked list encompassing the communication is moved to the linkedlist anchored by PortA head 222 a and PortA tail 222 b. Thus, transmitpointers 220 enable access to control 202 and memory 204 for thetransmission of communications, and the control and memory serve notonly as an input queue from the InfiniBand fabric, but also an outputqueue for external communications.

The sizes of the queue pair and external port linked lists are dynamic,allowing them to grow and shrink as InfiniBand traffic is received andas outbound communications are transmitted. The outbound communicationsmay be received via InfiniBand Send commands, RDMA Read operationsand/or other forms.

In an embodiment of the invention, a new outbound communication isreceived encapsulated within one or more InfiniBand packets. Whenreassembly of the new communication is initiated, the first memorybucket used for the new communication is also used to store variousmeta-information before storing the first portion of the communication.Illustratively, the meta-information may be stored in the first line ofthe first bucket, and may include information such as: the virtual laneand queue pair through which the communication is received, the externalport through which it should be transmitted, a quality of service (QoS)to be afforded the communication, a checksum calculated on thecommunication, checksum offset, etc.

When control of the reassembled communication is passed to a networktransmit module, the port and QoS information indicate where thepointers to the linked list describing the communication should bequeued. The virtual lane and queue pair information may be used by thenetwork transmit module, after the communication is transmitted, toreturn the used memory buckets (e.g., to the InfiniBand resource manageror receive module).

To properly manage the queue pairs and the issuance of queue pair(and/or virtual lane) credits, buckets in which an outboundcommunication is reassembled may not be released from a queue pair'slinked list until the communication is transmitted and the external portreleases the associated control entries and buckets. Then one or moreparameters (e.g., depth counters) indicating the amount of the sharedmemory structure used by the queue pair (and/or virtual lane) areupdated, which may allow the queue pair (and/or virtual lane) toadvertise more credits.

The queue pairs through which communications are received for reassemblymay be reliable connected queue pairs (RCQPs). Thus, each InfiniBandpacket received in one of the RCQPs may have a packet sequence number,and ordered receipt of the fragments of an outbound communication can beensured.

Some or all of the components illustrated in FIG. 2, as well as otherelements of a channel adapter, may be embedded on a single ASIC(Application-Specific Integrated Circuit). Thus, the size of memory 204and control 202 may be constrained. The use of linked lists for thequeue pairs allows flexible and efficient use of buffering memory,without wasting space or denying memory buckets to a queue pair orvirtual lane when needed.

FIG. 8 demonstrates a method of mapping communications between a memorystructure shared among multiple inbound InfiniBand queue pairs and oneor more outbound communication ports, according to one embodiment of theinvention.

In operation 802, an InfiniBand packet is received at a channel adapterof a device coupled to an InfiniBand fabric and an externalcommunication system (e.g., an Ethernet network), and is validatedaccording to the InfiniBand specification. This embodiment may beparticularly suited for processing InfiniBand Send commands thatcomprise encapsulated communications (e.g., Ethernet packets).Alternatively, the packet may contain a response to an RDMA Readoperation or some other content to be reassembled into an outboundcommunication.

In operation 804, the virtual lane and queue pair on which theInfiniBand packet was received are identified. Illustratively, theservice level associated with the packet's virtual lane may affect theQoS afforded the Ethernet packet when it is transmitted on one of theoutbound ports.

In operation 806, an InfiniBand resource manager or other moduledetermines whether there is space for the packet's payload in the sharedmemory structure. In particular, the resource manager may determinewhether storing the payload would exceed the memory (e.g., buckets)allocated or available to the packet's virtual lane or queue pair.

As described in a previous section, various parameters may be maintainedto reflect the amount of storage space used by a virtual lane or queuepair, the amount of space dedicated to a virtual lane or queue pair, theamount of shared space available, whether a virtual lane or queue pairis permitted to use the shared space, etc. If the payload cannot beaccommodated, the packet is dropped and/or an RNR-NAK notification issent to the other end of the connection, and the illustrated methodends.

In operation 808, the payload of the InfiniBand packet is stored in theshared memory structure. To find the location where the payload shouldbe stored, the linked list of memory buckets associated with thepacket's queue pair is referred to. For example, a tail pointer can befollowed, which points to the last bucket currently allocated to thequeue pair.

In this embodiment, entries in the shared control structure for theshared memory structure contain information regarding the status of thebucket that corresponds to the entry. Thus, it can readily be determinedwhere in a bucket the payload should be stored and whether the entirepayload will fit in the bucket. Illustratively, if the payload comprisesthe first fragment or portion of an outbound communication, a new bucketmay be used. Otherwise, the payload is stored contiguously with theprevious payload for the communication.

More specifically, if a newly arrived InfiniBand packet is part of apartially reassembled outbound communication, it is used to fill theremainder of the tail bucket (i.e., the bucket pointed to by the linkedlist's tail pointer). If the tail bucket is full, or the InfiniBandpacket is part of a new message, then a new bucket is started. In thiscase, the new bucket is pointed to by the address in the controlstructure pointed to by the tail pointer, and the new bucket becomes thenew tail bucket.

As described above, the first bucket for a new communication may beprepared by first storing information that will facilitate mapping ofthe communication to an external port and reclamation of the used memorybuckets.

Also in operation 808, the queue pair's linked list is updated asnecessary. For example, if a new memory bucket is needed to accommodatethe payload, the bucket and a new corresponding entry in the controlstructure are initialized as necessary and added to the queue pair'slinked list.

In operation 810, depth indicators (e.g., pointers, counters) areupdated as necessary to indicate how much traffic is currently stored inthe shared memory for the queue pair and/or the associated virtual lane.Illustratively, these parameters are maintained by the resource manager.

In operation 812, it is determined whether a full outbound communication(e.g., Ethernet packet, Packet Over SONET/SDH) has been reassembled. Ifso, the illustrated method advances to operation 814; otherwise, themethod returns to operation 802 to accept another InfiniBand packet, forthe same or a different queue pair.

In operation 814, the sub-list (of the queue pair's linked list) isidentified and posted or copied to the linked list structurecorresponding to the outbound port through which the completedcommunication will be transmitted. The sub-list comprises a set oflinked memory buckets and corresponding control entries.

To facilitate this re-mapping of the sub-list, pointers to the first andlast elements of the sub-list may be passed from the InfiniBand receivemodule (IRX) to the network transmit module (NTX) after the last portionof the communication is reassembled. These pointers will identify thefirst control entry and memory bucket and the last control entry andmemory bucket. In the illustrated method, the sub-list is not yetremoved from the queue pair's linked list.

In operation 816, the outbound port or the NTX links the sub-list to alinked list for the appropriate outbound queue of the external port.

In operation 818, the outbound port transmits the communication. Variousprocessing may be performed before the transmission (e.g., checksumcalculation, adding headers, VLAN ID insertion) by the NTX and MAC(Media Access Control) module or other component(s).

In operation 820, the outbound port (NTX) releases the control entriesand memory buckets corresponding to the communication (e.g., back to theIRM). Illustratively, control entries may include flags or otherindicators revealing whether a control entry (and/or associated memorybucket) is currently used by an outbound port. The flags will be resetwhen the associated memory buckets are reclaimed.

In operation 822, the control entries and memory buckets are releasedfrom the queue pair and returned to the free list. The memory bucketsand/or control entries may be flushed to clear their contents.

In operation 824, depth indicators for the queue pair (and/or virtuallane) through which the communication was received are updated toreflect the release of the sub-list.

In operation 826, queue pair and/or virtual lane credits may be issued,if possible, depending on how much traffic in the shared memorystructure now corresponds to the queue pair and virtual lane (e.g., thequeue pair or virtual lane depth and the dedicated or sharedthresholds). The issuance of credits may also depend upon how many freebuckets are available, how many buckets may be reserved for other queuepairs, how many credits have been issued by other queue pairs and/orvirtual lanes, etc.

For example, and as described in a previous section, a queue pair may ormay not be allocated a number of dedicated memory buckets, and may ormay not be permitted to use a pool of shared buckets. Thresholds may bedefined within the dedicated and/or shared sets of buckets. Differentnumbers of message credits may be advertisable as a number of bucketsused by a queue pair meets or exceeds each threshold level of buckets.Thus, to determine if (and how many) message credits the queue pair cannow advertise, the resource manager (or other module) may compare thepresent number of buckets used by the queue pair with applicablethresholds.

Interleaving Sends and RDMA Read Responses in a Single Receive Queue

In one embodiment of the invention, an InfiniBand queue pair's receivequeue receives and interleaves different types of traffic at a channeladapter. For example, the queue may receive Send commands that conveyencapsulated outbound communications (e.g., Ethernet packets). Each Sendcommand may comprise any number of individual InfiniBand packets, thepayloads of which are re-assembled in the queue to form thecommunication.

The queue may also receive Send commands that convey one or more RDMARead descriptors. When processed, the descriptors are used to configureRDMA Read requests from the channel adapter to the host that originatedthe Send command. In response, the host sends RDMA Read responsesconveying portions of an outbound communication to be assembled andtransmitted by the channel adapter.

Illustratively, the queue pair queue may be implemented as a series oflinked buckets in a shared memory structure, as described in precedingsections. In other embodiments, the queue may be implemented in otherways, and may be configured to store traffic other than InfiniBand Sendsand Reads, such as PCI Express communications, Asynchronous TransferMode (ATM) traffic, Fibre Channel transactions, etc.

FIG. 9 depicts a queue pair queue as it may be configured to store andfacilitate the processing of mixed InfiniBand receive traffic, in oneembodiment of the invention. In this embodiment, queue pair queue 902may be conceptually viewed as comprising a single queue, and may betreated as a single queue for flow control purposes. However, in thisembodiment of the invention, queue 902 comprises multiple linked lists,each with a head and tail pointer.

Thus, queuing area 910 is where new InfiniBand Send command packets arereceived and queued for processing (e.g., for reassembly or forwardingof the outbound communication corresponding to the Send command).Queuing area 910 has associated head pointer 912 and tail pointer 914.Tail pointer 914 identifies a tail of the queue, which may indicatewhere the next new content (e.g., new Send command) is to be stored.

Assembly (or reassembly) area 920 is where outbound communications areassembled (or reassembled) from portions received via separateInfiniBand packets (e.g., Send commands encapsulating an outboundcommunication, responses to RDMA Read requests). The assembly area ismanaged with the aid of assembly head pointer 922 and assembly tailpointer 924. The head of the assembly area of queue 902 coincides withthe first bucket of the next communication to be passed to a NetworkTransmit (NTX) module.

Queuing area 910 and/or assembly area 920 may be expanded by drawingupon a free list of buffers; as buffers are used in queue 902, they arereturned to the free list (e.g., after their corresponding outboundcommunications have been transmitted).

In the illustrated embodiment of the invention, head pointer 912identifies the entry or element (e.g., the next Send command) in queue902 that corresponds to the next outbound communication to be assembled,reassembled or passed forward.

In this embodiment of the invention, new Send commands (encapsulating anoutbound communication or a set of RDMA Read descriptors) are enqueuedat tail pointer 914 of the queuing area of queue pair queue 902. As Sendcommand packets are processed or dispatched from the queuing area to theassembly area, head pointer 912 is adjusted accordingly. As reassembledcommunications are forwarded to the NTX module, assembly head 922 andassembly tail 924 are advanced as needed.

When head pointer 912 is advanced to a new command in queuing area 910,the following action depends on which type of traffic the command is. Ifit is a Send command encapsulating an outbound communication, thecommunication should be fully re-assembled by the time the head pointergets to the command. If so, then the communication can simply be passedto the NTX module. This may be done by forwarding pointers identifyingthe beginning and end of the communication, as described in a previoussection. The buckets containing the communication are then unlinked fromqueue pair queue 902 and added to the external port's queue.

If the command identified by the next packet pointer is a Send commandencapsulating a set of RDMA Read descriptors, the Read descriptors areretrieved and corresponding RDMA Read requests are issued. As they arereceived, the resulting RDMA Read responses bypass the tail of the queueand are stored directly in assembly area 920. Buckets may be added tothe tail end of the assembly area of the queue as necessary toaccommodate the responses.

Thus, queuing area 910 and assembly area 920 may be seen as separatequeues or sub-queues. However, the last bucket of assembly area 920 mayreference head pointer 912 or the first bucket of queuing area 910.

FIG. 10 demonstrates in greater detail a method of handling mixedInfiniBand receive traffic (e.g., Sends and RDMA Read responses) in asingle queue pair receive queue.

In operation 1002, InfiniBand Send packets conveying various content arestored in the queue. Head, tail and/or other pointers of the queuingarea of the queue (e.g., a next packet pointer) are updated accordingly.Illustratively, most or all information other than the payloads isstripped from the InfiniBand packets before they are enqueued. Theinformation that is stripped off may include one or more headers, CRCs,etc.

In one embodiment of the invention, each section of the queue pair queuehas a first and last pointer configured to identify the beginning (e.g.,first memory bucket) and end (e.g., last bucket) of the section. Thesepointers may facilitate the transfer of communications and othercontent, and may overlap or be separate from the head, tail and nextpacket pointers discussed above.

In operation 1004, the next packet pointer is advanced to a queue entrycontaining an unprocessed command or packet. The queue entry maycomprise one or more memory buckets.

In operation 1006, the type of command or traffic is identified. Thismay be done by reading a sufficient portion of the command or packet.For example, the payload of the first InfiniBand packet conveying a newcommand may include meta-data, a proprietary header or other informationindicating what the command is.

If the command is an encapsulated Send (i.e., a Send command conveyingan encapsulated outbound communication), the method advances tooperation 1012. If the command is a Send command conveying one or moreRDMA Read descriptors, the illustrated method continues at operation1008.

In operation 1008, the RDMA Read descriptors are identified andcorresponding RDMA Read requests are issued to the specified host (e.g.,one Read request per descriptor) to retrieve the content of acommunication. In addition, one or more buckets may be appended to theassembly area of the queue pair queue, if needed (e.g., based on theexpected size of the communication).

In operation 1010, RDMA Read responses, corresponding to the RDMA Readrequests and containing portions of the communication, are received andassembled in the assembly area of the queue. The communication portionsmay be shifted or adjusted as necessary to store them contiguously. Thismay also require one or more queue pointers to be updated.

In operation 1012, it is determined whether all RDMA Read responses havebeen received for the current communication. If so, the method continueswith operation 1014; otherwise, the method returns to 1010 to continuereceiving the responses.

In operation 1014, the RDMA descriptors are returned.

In operation 1016, it is determined whether the communication iscomplete (i.e., completely assembled or re-assembled). If not, theillustrated method returns to operation 1002. While the communication isbeing assembled or reassembled, a checksum may be calculated. Thechecksum, checksum offset and/or other information useful for furtherprocessing of the communication (e.g., external port number, quality ofservice) may be stored in front of the communication (e.g., the firstlines of the first bucket) for use by the NTX module.

In operation 1018, the completed communication is dispatched to the NTXmodule. Illustratively, the first and last pointers of the assembly areaare used to unlink the completed communication's buckets from the queuepair queue and link them to the corresponding external port or aparticular queue of the external port. Queue pointers are updated asneeded, and the illustrated procedure then ends.

Tracking Responses to an RDMA Read Operation

In one embodiment of the invention, responses to an RDMA Read operationare tracked in the channel adapter that issued the operation.Illustratively, for each queue pair or other communication connection inwhich RDMA Reads are performed, a linked list or other structure (e.g. aFIFO) is maintained. A single memory structure may be employed, in whichthe linked lists may be interleaved.

In this embodiment, each entry in a queue pair's linked list identifiesthe range of Packet Sequence Numbers (PSN) associated with the expectedresponses to one RDMA Read operation. Each entry also includes a link tothe next entry in the list, and may also store the PSN of the mostrecently received response. When the last response is received, theentry may be removed, and a retry queue entry corresponding to the RDMARead may be retired. However, if a response is received out of order,the retry queue entry may be used to retry the RDMA Read.

FIG. 11 depicts a memory structure for maintaining the linked lists in achannel adapter, according to one embodiment of the invention. In thisembodiment, RDMA PSN tracking memory 1102 includes any number ofentries. The size of memory 1102, and number of entries, may depend uponfactors such as the number of queue pairs established on the channeladapter, the number of queue pairs enabled to perform RDMA Readoperations, the average or expected number of RDMA Reads, the estimatedperiod of time needed to complete an RDMA Read, etc.

RDMA PSN tracking memory 1102 may include virtually any number of linkedlists, but can accommodate one linked list for every active queue pairthat performs an RDMA Read operation.

Memory 1102 of FIG. 11 includes one linked list, which starts with entrym and also includes entries n and 1. Each entry corresponds to a singleRDMA Read operation. Each entry may be configured as shown for entry m,which identifies the first and last PSNs of the expected responses tothe RDMA Read, the PSN of most recently received (i.e., latest)response, and a link to the next entry in the linked list.

Any entry in memory 1102 may be part of any linked list. However, aparticular entry (e.g., entry 0) may be a null entry and may be used toterminate a linked list.

For each linked list in RDMA PSN tracking memory 1102, pointers aremaintained to the first and last entries. These pointers may be storedin memory or registers, such as RDMA tracking registers 1110, or someother structure. Thus, in FIG. 11, QPi head pointer 1112 a identifiesthe head of the linked list for queue pair i, while QPi tail pointer1112 b identifies the tail of the linked list.

Free entries—entries in memory 1102 not being used for any linkedlists—may be organized into a free list. In FIG. 11, a free list ismaintained using free head 1104 a, which identifies a first free entry,and free tail 1104 b, which identifies a last free entry. The freeentries may be linked using the “link” field of the entries; the otherfields are not used.

In other embodiments of the invention, an entry in a queue pair's linkedlist may contain virtually any information.

FIG. 12 demonstrates one method of tracking responses to an RDMA Readoperation using a linked list, according to one embodiment of theinvention.

In operation 1202, a channel adapter (for an InfiniBand environment) orother communication interface (for some other environment) receives oneor more RDMA Read descriptors. For example, a channel adapter mayreceive, on a particular queue pair, a Send command containing one ormore RDMA Read descriptors. Each descriptor describes all or a portionof a communication (e.g., an Ethernet packet) to be retrieved from ahost. In this embodiment, the queue pair is a reliable connected queuepair.

In operation 1204, a transmit module of the channel adapter eventuallyissues an RDMA Read operation to retrieve the communication, orcommunication portion, from the host. The amount of data to be retrievedmay be of virtually any size. The RDMA Read operation is assigned aPacket Sequence Number (PSN) to distinguish it from other transactionsconducted by the channel adapter.

In operation 1206, the number of expected responses to the RDMA Read iscalculated. This may be done by dividing the amount of data to beretrieved by the MTU (Maximum Transfer Unit) size in effect for thequeue pair (or other communication connection) through which the datawill be retrieved. As one skilled in the art will appreciate, eachresponse will have a different PSN, and all the responses' PSNs shouldbe in order, from a first PSN for a first response to a last PSN for alast response. Thus, the PSNs of the expected responses can be readilyascertained. This range of PSN values is communicated to a receivemodule that will receive the responses.

In operation 1208, the receive module initializes or adds to a linkedlist (such as the linked list of FIG. 11) corresponding to the queuepair. The receive module populates a new entry in the queue pair'slinked list with the range of PSNs (e.g., first and last) and a link tothe next (or a null) entry in the linked list.

A “latest” field in the entry, for tracking the PSN of the most recentlyresponse, may be initialized to a null or other value.

In operation 1210, an RDMA Read response is received on the same queuepair on which the RDMA Read was issued in operation 1204. As explainedin a previous section, RDMA Read responses may be received interleavedin a receive queue with other traffic (e.g., InfiniBand Sends).

In operation 1212, the PSN of the RDMA Read response is identified(e.g., by reading it from a header of the response).

In operation 1214, the PSN is examined to determine if it is out oforder. If the response is for the issued RDMA Read, but is not the nextexpected response, the method advances to operation 1218.

In operation 1216, the PSN is in order, and a determination is made asto whether this response is the last one expected for the RDMA Read. Ifnot, the method returns to operation 1210 to receive the next response.

Otherwise, in operation 1218, the transmit module is notified that allresponses have been correctly received. Therefore, the transmit module,if it maintains a retry queue for RDMA Reads, can retire a retry queueentry corresponding to the RDMA Read issued in operation 1204.

However, if operation 1218 is reached directly from operation 1214, thetransmit module is notified of the out of order receipt of a response tothe RDMA Read. The transmit module may then retry the operation. In thiscase, the corresponding entry in the linked list may be removed in favorof the retried operation.

The foregoing embodiments of the invention have been presented forpurposes of illustration and description only. They are not intended tobe exhaustive or to limit the invention to the forms disclosed.Accordingly, the scope of the invention is defined by the appendedclaims, not the preceding disclosure.

1. In a communication device coupled to an InfiniBand network and an external communication system, a method of transferring a communication from the InfiniBand network to the external communication system, the method comprising: receiving packets for each of multiple queue pairs terminating at the communication device; for each of said queue pairs: reassembling in a shared memory contents of said packets into communications to be transmitted to the external communication system, wherein the memory is a single contiguous memory structure shared by multiple queue pairs and virtual lanes, and wherein a given packet payload is stored contiguously in the memory; and maintaining an associated linked list identifying locations in said shared single contiguous memory in which said communications are reassembled; and when a communication is reassembled for a first queue pair, identifying to a transmission module a portion of a first linked list associated with said first queue pair, wherein said first linked list portion identifies shared single contiguous memory locations in which said communication was reassembled.
 2. The method of claim 1, further comprising: only after said reassembled communication is transmitted, removing said portion of said first linked list from said first linked list.
 3. The method of claim 1, wherein said reassembling comprises: as said packets are received from the InfiniBand network, queuing said contents directly into said shared single contiguous memory; wherein said shared single contiguous memory serves as receive queues for each of said multiple queue pairs.
 4. The method of claim 3, further comprising: transmitting said reassembled communication from said shared single contiguous memory; wherein said shared single contiguous memory serves as a transmit queue for the external communication system.
 5. The method of claim 1, wherein the external communication system is an Ethernet network.
 6. The method of claim 5, wherein said received packets comprise portions of encapsulated Ethernet packets.
 7. The method of claim 1, wherein said identifying to a transmission module comprises transferring to the transmission module a set of pointers identifying said reassembled communication rather than transferring to the transmission module said reassembled communication.
 8. The method of claim 1, wherein said identifying to a transmission module comprises identifying to the transmission module: a head of said portion of said first linked list; and a tail of said portion of said first linked list.
 9. The method of claim 1, wherein said maintaining an associated linked list for said first queue pair comprises: maintaining a head pointer configured to identify: a first location in said shared single contiguous memory in which contents of a first packet are stored; and a first entry in a shared control structure, said first entry corresponding to said first location in said shared single contiguous memory; and maintaining a tail pointer configured to identify: a final location in said shared single contiguous memory in which contents of a final packet are stored; and a final entry in said shared control structure; wherein each entry in said shared control structure that is part of said first linked list, except for said final entry, identifies a subsequent entry in said shared control structure and identifies a location in said shared single contiguous memory corresponding to said subsequent entry.
 10. The method of claim 9, further comprising: protecting said shared control structure by one or more of: separating bits of the structure to prevent double bit errors; and providing single error correct and double error detect protection for one or more entries in the control structure.
 11. The method of claim 10, further comprising: extending the single error correct and double error detect protection to include said location in said shared single contiguous memory.
 12. The method of claim 1, further comprising: managing said linked lists for said queue pairs with a shared control; wherein each said location in said shared single contiguous memory corresponds to an entry in said shared control; and wherein each entry in said shared control is configured to identify: a subsequent entry within the same linked list; and a location in said shared single contiguous memory corresponding to said subsequent entry.
 13. A computer readable medium storing instructions that, when executed by a computer, cause the computer to perform a method of transferring a communication from an InfiniBand network to a communication system external to the InfiniBand network, the method comprising: for each of multiple queue pairs terminating at the communication device, receiving packets; for each of said queue pairs: reassembling in a shared memory contents of said packets into communications to be transmitted to the external communication system, wherein the memory is a single contiguous memory structure shared by multiple queue pairs and virtual lanes, and wherein a given packet payload is stored contiguously in the memory; and maintaining an associated linked list identifying locations in said shared single contiguous memory in which said communications are reassembled; and when a communication is reassembled for a first queue pair, identifying to a transmission module a portion of a first linked list associated with said first queue pair, wherein said first linked list portion identifies shared single contiguous memory locations in which said communication was reassembled.
 14. The computer readable medium of claim 13, the method further comprising: as said packets are received from the InfiniBand network, queuing said contents directly into said shared single contiguous memory, wherein said shared single contiguous memory serves as receive queues for each of said multiple queue pairs; and transmitting said reassembled communication from said shared single contiguous memory, wherein said shared single contiguous memory also serves as a transmit queue for the external communication system.
 15. The computer readable medium of claim 13, wherein said identifying to a transmission module comprises transferring to the transmission module a set of pointers identifying said reassembled communication rather than transferring to the transmission module said reassembled communication.
 16. A method of storing a communication, received from an InfiniBand network, for transmission external to the InfiniBand network, the method comprising: receiving a set of InfiniBand packets from an InfiniBand network, each said packet comprising a portion of a communication to be transmitted external to the InfiniBand network; storing said communication portions in a single contiguous memory shared among multiple queue pairs and virtual lanes of the InfiniBand network, including a first queue pair through which said set of InfiniBand packets is received, and wherein a given packet payload is stored contiguously in the memory; maintaining a first linked list for said first queue pair to identify locations in said single contiguous memory in which said communication portions are stored; and when all of said communication portions are stored in said single contiguous memory, scheduling said communication for transmission from said single contiguous memory.
 17. The method of claim 16, wherein said storing comprises reassembling said communication portions into said communication.
 18. The method of claim 16, wherein said scheduling comprises: identifying to a transmission module a first entry in said first linked list corresponding to a location in said single contiguous memory in which a first portion of said communication is stored; and identifying to a transmission module a final entry in said first linked list corresponding to a location in said single contiguous memory in which a final portion of said communication is stored.
 19. The method of claim 16, wherein said InfiniBand packets comprise Send commands conveying said portions of said first communication.
 20. The method of claim 16, wherein said communication is an Ethernet packet.
 21. The method of claim 16, wherein said maintaining a first linked list comprises: maintaining a head pointer identifying: a first entry in a control structure; and a first location in said single contiguous memory in which a first portion of said communication is stored; and maintaining a tail pointer identifying: a final entry in said control structure; and a final location in said single contiguous memory in which a final portion of said communication is stored; wherein said first entry is linked to said final entry by zero or more intermediate entries in said control structure, each said intermediate entry corresponding to an intermediate location in said single contiguous memory in which a portion of said communication is stored.
 22. The method of claim 21, further comprising: updating said first linked list to remove said first entry, said final entry and said intermediate entries from said first linked list only after said communication is transmitted.
 23. The method of claim 16, wherein said maintaining a first linked list comprises: in a control structure, maintaining a first linked list of control entries, wherein each of said control entries except a final control entry identifies: a subsequent control entry; and corresponding to said subsequent control entry, a location in said single contiguous memory in which data received through said first queue pair are stored.
 24. The method of claim 23, wherein said control structure and said single contiguous memory are separate physical memory structures.
 25. The method of claim 24, wherein said control structure and said single contiguous memory employ common addressing via said first linked list.
 26. The method of claim 23, wherein said maintaining further comprises: maintaining a head pointer identifying a first control entry in said first linked list and a first location in said single contiguous memory; and maintaining a tail pointer identifying said final control entry in said first linked list and a final location in said single contiguous memory.
 27. The method of claim 23, further comprising: identifying to a transmission module a sub-list of said first linked list of control entries, wherein said sub-list includes control entries corresponding to all locations in said single contiguous memory in which portions of said communication are stored.
 28. The method of claim 27, further comprising: removing said sub-list of control entries from said first linked list only after said communication is transmitted.
 29. A computer readable medium storing instructions that, when executed by a computer, cause the computer to perform a method of storing a communication, received from an InfiniBand network, for transmission external to the InfiniBand network, the method comprising: receiving a set of InfiniBand packets from an InfiniBand network, each said packet comprising a portion of a communication to be transmitted external to the InfiniBand network; storing said communication portions in a single contiguous memory shared among multiple queue pairs and virtual lanes of the InfiniBand network, including a first queue pair through which said set of InfiniBand packets is received, wherein a given packet payloads is stored contiguously in the memory; maintaining a first linked list for said first queue pair to identify locations in said single contiguous memory in which said communication portions are stored; and when all of said communication portions are stored in said single contiguous memory, scheduling said communication for transmission from said single contiguous memory.
 30. The computer readable medium of claim 29, wherein said scheduling comprises: identifying to a transmission module a first entry in said first linked list corresponding to a location in said single contiguous memory in which a first portion of said communication is stored; and identifying to a transmission module a final entry in said first linked list corresponding to a location in said single contiguous memory in which a final portion of said communication is stored.
 31. The computer readable medium of claim 29, wherein said maintaining a first linked list comprises: in a control structure, maintaining a first linked list of control entries, wherein each of said control entries except a final control entry identifies: a subsequent control entry; and corresponding to said subsequent control entry, a location in said single contiguous memory in which data received through said first queue pair are stored; maintaining a head pointer identifying a first control entry in said first linked list and a first location in said single contiguous memory; and maintaining a tail pointer identifying said final control entry in said first linked list and a final location in said single contiguous memory.
 32. The computer readable medium of claim 31, wherein the method further comprises: identifying to a transmission module a sub-list of said first linked list of control entries, wherein said sub-list includes control entries corresponding to all locations in said single contiguous memory in which portions of said communication are stored.
 33. The computer readable medium of claim 32, wherein the method further comprises: removing said sub-list of control entries from said first linked list only after said communication is transmitted.
 34. A computer readable memory structure configured for simultaneously queuing contents of packets as they are received from an InfiniBand network and storing communications reassembled from said contents for transmission external to the InfiniBand network, the memory structure comprising: a single contiguous memory shared by multiple queue pairs and virtual lanes, comprising: for each of a plurality of InfiniBand communication connections, memory buckets for storing contents of packets received on the communication connection, wherein a given packet payload is stored contiguously in the memory within and across the buckets; wherein said contents of said packets are reassembled into communications in said memory buckets as said contents are stored; a shared control, comprising: for each of said communication connections, a linked list of control entries, wherein each said control entry is configured to identify: a subsequent control entry in said linked list; and in said shared single contiguous memory, a memory bucket corresponding to said subsequent control entry; wherein said shared single contiguous memory and said shared control are configured for access by: an InfiniBand receive module configured to receive said packets; and a transmit module configured to transmit said communications external to the InfiniBand network.
 35. The computer readable memory structure of claim 34, wherein said shared control further comprises: a linked list of free entries, wherein each said free entry is configured to identify, in said shared single contiguous memory, a free memory bucket.
 36. The computer readable memory structure of claim 34, wherein said shared control is protected by one or more of: separating bits of the structure to prevent double bit errors; and providing single error correct and double error detect protection for one or more control entries in the shared control.
 37. The computer readable memory structure of claim 36, wherein a control entry in said shared control is further protected by extending the single error correct and double error detect protection to include the identity of a memory bucket in said shared single contiguous memory.
 38. An apparatus for storing data received from an InfiniBand network, for transfer to an external communication system, comprising: an InfiniBand receive module configured to receive packets from a plurality of InfiniBand communication connections; a transmit module configured to transmit communications to a communication system external to the InfiniBand network via one or more outbound ports; a single contiguous memory shared between said InfiniBand receive module and said transmit module, wherein a given packet payload is stored contiguously in the memory; and a control, shared between said InfiniBand receive module and said transmit module, for maintaining a linked list for each of said communication connections and for each of the outbound ports.
 39. The apparatus of claim 38, further comprising, for each said communication connection: a head pointer identifying a head of said linked list for said communication connection; and a tail pointer identifying a tail of said linked list for said communication connection.
 40. The apparatus of claim 38, further comprising, for each of the outbound ports: a head pointer identifying a head of said linked list for the outbound port; and a tail pointer identifying a tail of said linked list for the outbound port.
 41. The apparatus of claim 40, further comprising, for each outbound queue of each of the outbound ports: a head pointer identifying a head of said linked list for the outbound queue; and a tail pointer identifying a tail of said linked list for the outbound queue.
 42. The apparatus of claim 38, wherein said communication connections are queue pairs.
 43. The apparatus of claim 38, wherein said communication connections are virtual lanes.
 44. The apparatus of claim 38, wherein the external communication system comprises an Ethernet network.
 45. The apparatus of claim 38, wherein the external communication system comprises a SONET network. 